home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
cmln0885.arc
/
CROSST2.LTG
< prev
next >
Wrap
Text File
|
1986-02-27
|
896b
|
32 lines
Crossthoughts Listingá 2«á
PP╠ routine≤ t∩ recal∞ anΣ storσ element≤ oµ ß two-dimensiona∞ ì
virtua∞ array¼ usinτ thσ checkerboarΣ method
FUNCTION MATLOC(VM_Row_Index, VM_Col_Index : integer) return integer
BEGIN
Calculate sought row and column pages numbers
Calculate final sought page number as a one dimensional array
Search for page among RAM resident pages
IF NOT Found
THEN
Select page to swap
IF Selected page has been modifed THEN save it END IF
Load sought page
Update table entry information
END IF
return (address of page as indicated in the page table entry)
END LOC
PROCEDURE VM_MAT_Assign(VM_Index : integer; X : Your_data)
BEGIN
RAM_Data[LOC(VM_Row_Index,VM_Col_Index)] = X
Table[SOUGHT_PAGE].Dirty_bit = 1
END VM_MAT_Assign